# define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void compute(int (*arr)[9])
{
	for (int i = 0; i < 9; i++)
	{
		for (int j = 0; j <= i; j++)
		{
			if (i == 0 || i == j || j == 0)
			{
				arr[i][j] = 1;
			}
			else
			{
				arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
			}
		}
	}
}
void print(int(*arr)[9])
{
	for (int i = 0; i < 9; i++)
	{
		for (int j = 0; j <= i; j++)
		{
			printf("%3d", arr[i][j]);
		}
		printf("\n");
	}
}
int main()
{
	int arr[9][9] = { 0 };
	compute(arr);
	print(arr);
	return 0;
}